package com.aaa.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 收费表
 * </p>
 *
 * @author pzs
 * @since 2023-03-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("his_order_charge")
public class OrderCharge implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 收费ID
     */
      private String orderId;

    /**
     * 总费用
     */
    private BigDecimal orderAmount;

    /**
     * 病历ID
     */
    private String chId;

    /**
     * 挂号单
     */
    private String regId;

    /**
     * 患者名称
     */
    private String patientName;

    /**
     * 订单状态0未支付  1 支付成功  2支付超时 3支付失败 字典表his_order_charge_status
     */
    private String orderStatus;

    /**
     * 支付ID
     */
    private String payPlatformId;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime payTime;

    /**
     * 支付类型0现金1支付宝  字典表his_pay_type_status
     */
    private String payType;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 更新者
     */
    private String updateBy;

    @TableField(exist = false)
    private OrderChargeItem orderChargeItem;

    public OrderCharge(String orderId, String regId, String patientName, BigDecimal orderAmount, LocalDateTime createTime, String payType, String orderStatus, String chId, LocalDateTime payTime) {
        this.orderId = orderId;
        this.orderAmount = orderAmount;
        this.regId = regId;
        this.patientName = patientName;
        this.orderStatus = orderStatus;
        this.payType = payType;
        this.chId=chId;
        this.createTime=createTime;
        this.payTime=payTime;

    }
}
